//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS FinspaceData service.
///
///  The FinSpace APIs let you take actions inside the FinSpace.
public struct FinspaceData: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the FinspaceData client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "FinspaceData",
            serviceIdentifier: "finspace-api",
            serviceProtocol: .restjson,
            apiVersion: "2020-07-13",
            endpoint: endpoint,
            errorType: FinspaceDataErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }





    // MARK: API Calls

    /// Adds a user to a permission group to grant permissions for actions a user can perform in FinSpace.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func associateUserToPermissionGroup(_ input: AssociateUserToPermissionGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> AssociateUserToPermissionGroupResponse {
        try await self.client.execute(
            operation: "AssociateUserToPermissionGroup", 
            path: "/permission-group/{permissionGroupId}/users/{userId}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a user to a permission group to grant permissions for actions a user can perform in FinSpace.
    ///
    /// Parameters:
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - permissionGroupId: The unique identifier for the permission group.
    ///   - userId: The unique identifier for the user.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func associateUserToPermissionGroup(
        clientToken: String? = AssociateUserToPermissionGroupRequest.idempotencyToken(),
        permissionGroupId: String,
        userId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> AssociateUserToPermissionGroupResponse {
        let input = AssociateUserToPermissionGroupRequest(
            clientToken: clientToken, 
            permissionGroupId: permissionGroupId, 
            userId: userId
        )
        return try await self.associateUserToPermissionGroup(input, logger: logger)
    }

    /// Creates a new Changeset in a FinSpace Dataset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func createChangeset(_ input: CreateChangesetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateChangesetResponse {
        try await self.client.execute(
            operation: "CreateChangeset", 
            path: "/datasets/{datasetId}/changesetsv2", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new Changeset in a FinSpace Dataset.
    ///
    /// Parameters:
    ///   - changeType: The option to indicate how a Changeset will be applied to a Dataset.    REPLACE – Changeset will be considered as a replacement to all prior loaded Changesets.    APPEND – Changeset will be considered as an addition to the end of all prior loaded Changesets.    MODIFY – Changeset is considered as a replacement to a specific prior ingested Changeset.
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - datasetId: The unique identifier for the FinSpace Dataset where the Changeset will be created.
    ///   - formatParams: Options that define the structure of the source file(s) including the format type (formatType), header row (withHeader), data separation character (separator) and the type of compression (compression).   formatType is a required attribute and can have the following values:     PARQUET – Parquet source file format.    CSV – CSV source file format.    JSON – JSON source file format.    XML – XML source file format.   Here is an example of how you could specify the formatParams:   "formatParams":  { "formatType": "CSV", "withHeader": "true", "separator": ",", "compression":"None" }    Note that if you only provide formatType as CSV, the rest of the attributes will automatically default to CSV values as following:   { "withHeader": "true", "separator": "," }   For more information about supported file formats, see Supported Data Types and File Formats in the FinSpace User Guide.
    ///   - sourceParams: Options that define the location of the data being ingested (s3SourcePath) and the source of the changeset (sourceType). Both s3SourcePath and sourceType are required attributes. Here is an example of how you could specify the sourceParams:   "sourceParams":  { "s3SourcePath": "s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv", "sourceType": "S3" }   The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see Loading data from an Amazon S3 Bucket using the FinSpace API section.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func createChangeset(
        changeType: ChangeType,
        clientToken: String? = CreateChangesetRequest.idempotencyToken(),
        datasetId: String,
        formatParams: [String: String],
        sourceParams: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateChangesetResponse {
        let input = CreateChangesetRequest(
            changeType: changeType, 
            clientToken: clientToken, 
            datasetId: datasetId, 
            formatParams: formatParams, 
            sourceParams: sourceParams
        )
        return try await self.createChangeset(input, logger: logger)
    }

    /// Creates a Dataview for a Dataset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func createDataView(_ input: CreateDataViewRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDataViewResponse {
        try await self.client.execute(
            operation: "CreateDataView", 
            path: "/datasets/{datasetId}/dataviewsv2", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a Dataview for a Dataset.
    ///
    /// Parameters:
    ///   - asOfTimestamp: Beginning time to use for the Dataview. The value is determined as epoch time in milliseconds. For example, the value for Monday, November 1, 2021 12:00:00 PM UTC is specified as 1635768000000.
    ///   - autoUpdate: Flag to indicate Dataview should be updated automatically.
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - datasetId: The unique Dataset identifier that is used to create a Dataview.
    ///   - destinationTypeParams: Options that define the destination type for the Dataview.
    ///   - partitionColumns: Ordered set of column names used to partition data.
    ///   - sortColumns: Columns to be used for sorting the data.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func createDataView(
        asOfTimestamp: Int64? = nil,
        autoUpdate: Bool? = nil,
        clientToken: String? = CreateDataViewRequest.idempotencyToken(),
        datasetId: String,
        destinationTypeParams: DataViewDestinationTypeParams,
        partitionColumns: [String]? = nil,
        sortColumns: [String]? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDataViewResponse {
        let input = CreateDataViewRequest(
            asOfTimestamp: asOfTimestamp, 
            autoUpdate: autoUpdate, 
            clientToken: clientToken, 
            datasetId: datasetId, 
            destinationTypeParams: destinationTypeParams, 
            partitionColumns: partitionColumns, 
            sortColumns: sortColumns
        )
        return try await self.createDataView(input, logger: logger)
    }

    /// Creates a new FinSpace Dataset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func createDataset(_ input: CreateDatasetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateDatasetResponse {
        try await self.client.execute(
            operation: "CreateDataset", 
            path: "/datasetsv2", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new FinSpace Dataset.
    ///
    /// Parameters:
    ///   - alias: The unique resource identifier for a Dataset.
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - datasetDescription: Description of a Dataset.
    ///   - datasetTitle: Display title for a FinSpace Dataset.
    ///   - kind: The format in which Dataset data is structured.    TABULAR – Data is structured in a tabular format.    NON_TABULAR – Data is structured in a non-tabular format.
    ///   - ownerInfo: Contact information for a Dataset owner.
    ///   - permissionGroupParams: Permission group parameters for Dataset permissions.
    ///   - schemaDefinition: Definition for a schema on a tabular Dataset.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func createDataset(
        alias: String? = nil,
        clientToken: String? = CreateDatasetRequest.idempotencyToken(),
        datasetDescription: String? = nil,
        datasetTitle: String,
        kind: DatasetKind,
        ownerInfo: DatasetOwnerInfo? = nil,
        permissionGroupParams: PermissionGroupParams,
        schemaDefinition: SchemaUnion? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateDatasetResponse {
        let input = CreateDatasetRequest(
            alias: alias, 
            clientToken: clientToken, 
            datasetDescription: datasetDescription, 
            datasetTitle: datasetTitle, 
            kind: kind, 
            ownerInfo: ownerInfo, 
            permissionGroupParams: permissionGroupParams, 
            schemaDefinition: schemaDefinition
        )
        return try await self.createDataset(input, logger: logger)
    }

    /// Creates a group of permissions for various actions that a user can perform in FinSpace.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func createPermissionGroup(_ input: CreatePermissionGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreatePermissionGroupResponse {
        try await self.client.execute(
            operation: "CreatePermissionGroup", 
            path: "/permission-group", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a group of permissions for various actions that a user can perform in FinSpace.
    ///
    /// Parameters:
    ///   - applicationPermissions: The option to indicate FinSpace application permissions that are granted to a specific group.  When assigning application permissions, be aware that the permission ManageUsersAndGroups allows users to grant themselves or others access to any functionality in their FinSpace environment's application. It should only be granted to trusted users.     CreateDataset – Group members can create new datasets.    ManageClusters – Group members can manage Apache Spark clusters from FinSpace notebooks.    ManageUsersAndGroups – Group members can manage users and permission groups. This is a privileged permission that allows users to grant themselves or others access to any functionality in the application. It should only be granted to trusted users.    ManageAttributeSets – Group members can manage attribute sets.    ViewAuditData – Group members can view audit data.    AccessNotebooks – Group members will have access to FinSpace notebooks.    GetTemporaryCredentials – Group members can get temporary API credentials.
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - description: A brief description for the permission group.
    ///   - name: The name of the permission group.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func createPermissionGroup(
        applicationPermissions: [ApplicationPermission],
        clientToken: String? = CreatePermissionGroupRequest.idempotencyToken(),
        description: String? = nil,
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreatePermissionGroupResponse {
        let input = CreatePermissionGroupRequest(
            applicationPermissions: applicationPermissions, 
            clientToken: clientToken, 
            description: description, 
            name: name
        )
        return try await self.createPermissionGroup(input, logger: logger)
    }

    /// Creates a new user in FinSpace.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func createUser(_ input: CreateUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateUserResponse {
        try await self.client.execute(
            operation: "CreateUser", 
            path: "/user", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a new user in FinSpace.
    ///
    /// Parameters:
    ///   - apiAccess: The option to indicate whether the user can use the GetProgrammaticAccessCredentials API to obtain credentials that can then be used to access other FinSpace Data API operations.    ENABLED – The user has permissions to use the APIs.    DISABLED – The user does not have permissions to use any APIs.
    ///   - apiAccessPrincipalArn: The ARN identifier of an AWS user or role that is allowed to call the GetProgrammaticAccessCredentials API to obtain a credentials token for a specific FinSpace user. This must be an IAM role within your FinSpace account.
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - emailAddress: The email address of the user that you want to register. The email address serves as a uniquer identifier for each user and cannot be changed after it's created.
    ///   - firstName: The first name of the user that you want to register.
    ///   - lastName: The last name of the user that you want to register.
    ///   - type: The option to indicate the type of user. Use one of the following options to specify this parameter:    SUPER_USER – A user with permission to all the functionality and data in FinSpace.    APP_USER – A user with specific permissions in FinSpace. The users are assigned permissions by adding them to a permission group.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func createUser(
        apiAccess: ApiAccess? = nil,
        apiAccessPrincipalArn: String? = nil,
        clientToken: String? = CreateUserRequest.idempotencyToken(),
        emailAddress: String,
        firstName: String? = nil,
        lastName: String? = nil,
        type: UserType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateUserResponse {
        let input = CreateUserRequest(
            apiAccess: apiAccess, 
            apiAccessPrincipalArn: apiAccessPrincipalArn, 
            clientToken: clientToken, 
            emailAddress: emailAddress, 
            firstName: firstName, 
            lastName: lastName, 
            type: type
        )
        return try await self.createUser(input, logger: logger)
    }

    /// Deletes a FinSpace Dataset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func deleteDataset(_ input: DeleteDatasetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteDatasetResponse {
        try await self.client.execute(
            operation: "DeleteDataset", 
            path: "/datasetsv2/{datasetId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a FinSpace Dataset.
    ///
    /// Parameters:
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - datasetId: The unique identifier of the Dataset to be deleted.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func deleteDataset(
        clientToken: String? = DeleteDatasetRequest.idempotencyToken(),
        datasetId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteDatasetResponse {
        let input = DeleteDatasetRequest(
            clientToken: clientToken, 
            datasetId: datasetId
        )
        return try await self.deleteDataset(input, logger: logger)
    }

    /// Deletes a permission group. This action is irreversible.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func deletePermissionGroup(_ input: DeletePermissionGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DeletePermissionGroupResponse {
        try await self.client.execute(
            operation: "DeletePermissionGroup", 
            path: "/permission-group/{permissionGroupId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a permission group. This action is irreversible.
    ///
    /// Parameters:
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - permissionGroupId: The unique identifier for the permission group that you want to delete.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func deletePermissionGroup(
        clientToken: String? = DeletePermissionGroupRequest.idempotencyToken(),
        permissionGroupId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeletePermissionGroupResponse {
        let input = DeletePermissionGroupRequest(
            clientToken: clientToken, 
            permissionGroupId: permissionGroupId
        )
        return try await self.deletePermissionGroup(input, logger: logger)
    }

    /// Denies access to the FinSpace web application and API for the specified user.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func disableUser(_ input: DisableUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DisableUserResponse {
        try await self.client.execute(
            operation: "DisableUser", 
            path: "/user/{userId}/disable", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Denies access to the FinSpace web application and API for the specified user.
    ///
    /// Parameters:
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - userId: The unique identifier for the user that you want to deactivate.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func disableUser(
        clientToken: String? = DisableUserRequest.idempotencyToken(),
        userId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DisableUserResponse {
        let input = DisableUserRequest(
            clientToken: clientToken, 
            userId: userId
        )
        return try await self.disableUser(input, logger: logger)
    }

    /// Removes a user from a permission group.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func disassociateUserFromPermissionGroup(_ input: DisassociateUserFromPermissionGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> DisassociateUserFromPermissionGroupResponse {
        try await self.client.execute(
            operation: "DisassociateUserFromPermissionGroup", 
            path: "/permission-group/{permissionGroupId}/users/{userId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a user from a permission group.
    ///
    /// Parameters:
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - permissionGroupId: The unique identifier for the permission group.
    ///   - userId: The unique identifier for the user.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func disassociateUserFromPermissionGroup(
        clientToken: String? = DisassociateUserFromPermissionGroupRequest.idempotencyToken(),
        permissionGroupId: String,
        userId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DisassociateUserFromPermissionGroupResponse {
        let input = DisassociateUserFromPermissionGroupRequest(
            clientToken: clientToken, 
            permissionGroupId: permissionGroupId, 
            userId: userId
        )
        return try await self.disassociateUserFromPermissionGroup(input, logger: logger)
    }

    ///  Allows the specified user to access the FinSpace web application and API.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func enableUser(_ input: EnableUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> EnableUserResponse {
        try await self.client.execute(
            operation: "EnableUser", 
            path: "/user/{userId}/enable", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    ///  Allows the specified user to access the FinSpace web application and API.
    ///
    /// Parameters:
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - userId: The unique identifier for the user that you want to activate.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func enableUser(
        clientToken: String? = EnableUserRequest.idempotencyToken(),
        userId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> EnableUserResponse {
        let input = EnableUserRequest(
            clientToken: clientToken, 
            userId: userId
        )
        return try await self.enableUser(input, logger: logger)
    }

    /// Get information about a Changeset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func getChangeset(_ input: GetChangesetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetChangesetResponse {
        try await self.client.execute(
            operation: "GetChangeset", 
            path: "/datasets/{datasetId}/changesetsv2/{changesetId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Get information about a Changeset.
    ///
    /// Parameters:
    ///   - changesetId: The unique identifier of the Changeset for which to get data.
    ///   - datasetId: The unique identifier for the FinSpace Dataset where the Changeset is created.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func getChangeset(
        changesetId: String,
        datasetId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetChangesetResponse {
        let input = GetChangesetRequest(
            changesetId: changesetId, 
            datasetId: datasetId
        )
        return try await self.getChangeset(input, logger: logger)
    }

    /// Gets information about a Dataview.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func getDataView(_ input: GetDataViewRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDataViewResponse {
        try await self.client.execute(
            operation: "GetDataView", 
            path: "/datasets/{datasetId}/dataviewsv2/{dataViewId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets information about a Dataview.
    ///
    /// Parameters:
    ///   - datasetId: The unique identifier for the Dataset used in the Dataview.
    ///   - dataViewId: The unique identifier for the Dataview.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func getDataView(
        datasetId: String,
        dataViewId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDataViewResponse {
        let input = GetDataViewRequest(
            datasetId: datasetId, 
            dataViewId: dataViewId
        )
        return try await self.getDataView(input, logger: logger)
    }

    /// Returns information about a Dataset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func getDataset(_ input: GetDatasetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetDatasetResponse {
        try await self.client.execute(
            operation: "GetDataset", 
            path: "/datasetsv2/{datasetId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about a Dataset.
    ///
    /// Parameters:
    ///   - datasetId: The unique identifier for a Dataset.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func getDataset(
        datasetId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetDatasetResponse {
        let input = GetDatasetRequest(
            datasetId: datasetId
        )
        return try await self.getDataset(input, logger: logger)
    }

    /// Returns the credentials to access the external Dataview from an S3 location. To call this API:   You must retrieve the programmatic credentials.   You must be a member of a FinSpace user group, where the dataset that you want to access has Read Dataset Data permissions.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func getExternalDataViewAccessDetails(_ input: GetExternalDataViewAccessDetailsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetExternalDataViewAccessDetailsResponse {
        try await self.client.execute(
            operation: "GetExternalDataViewAccessDetails", 
            path: "/datasets/{datasetId}/dataviewsv2/{dataViewId}/external-access-details", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the credentials to access the external Dataview from an S3 location. To call this API:   You must retrieve the programmatic credentials.   You must be a member of a FinSpace user group, where the dataset that you want to access has Read Dataset Data permissions.
    ///
    /// Parameters:
    ///   - datasetId: The unique identifier for the Dataset.
    ///   - dataViewId: The unique identifier for the Dataview that you want to access.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func getExternalDataViewAccessDetails(
        datasetId: String,
        dataViewId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetExternalDataViewAccessDetailsResponse {
        let input = GetExternalDataViewAccessDetailsRequest(
            datasetId: datasetId, 
            dataViewId: dataViewId
        )
        return try await self.getExternalDataViewAccessDetails(input, logger: logger)
    }

    /// Retrieves the details of a specific permission group.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func getPermissionGroup(_ input: GetPermissionGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetPermissionGroupResponse {
        try await self.client.execute(
            operation: "GetPermissionGroup", 
            path: "/permission-group/{permissionGroupId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves the details of a specific permission group.
    ///
    /// Parameters:
    ///   - permissionGroupId: The unique identifier for the permission group.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func getPermissionGroup(
        permissionGroupId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetPermissionGroupResponse {
        let input = GetPermissionGroupRequest(
            permissionGroupId: permissionGroupId
        )
        return try await self.getPermissionGroup(input, logger: logger)
    }

    /// Request programmatic credentials to use with FinSpace SDK. For more information, see Step 2. Access credentials programmatically using IAM access key id and secret access key.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func getProgrammaticAccessCredentials(_ input: GetProgrammaticAccessCredentialsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetProgrammaticAccessCredentialsResponse {
        try await self.client.execute(
            operation: "GetProgrammaticAccessCredentials", 
            path: "/credentials/programmatic", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Request programmatic credentials to use with FinSpace SDK. For more information, see Step 2. Access credentials programmatically using IAM access key id and secret access key.
    ///
    /// Parameters:
    ///   - durationInMinutes: The time duration in which the credentials remain valid.
    ///   - environmentId: The FinSpace environment identifier.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func getProgrammaticAccessCredentials(
        durationInMinutes: Int64? = nil,
        environmentId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetProgrammaticAccessCredentialsResponse {
        let input = GetProgrammaticAccessCredentialsRequest(
            durationInMinutes: durationInMinutes, 
            environmentId: environmentId
        )
        return try await self.getProgrammaticAccessCredentials(input, logger: logger)
    }

    /// Retrieves details for a specific user.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func getUser(_ input: GetUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetUserResponse {
        try await self.client.execute(
            operation: "GetUser", 
            path: "/user/{userId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Retrieves details for a specific user.
    ///
    /// Parameters:
    ///   - userId: The unique identifier of the user to get data for.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func getUser(
        userId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetUserResponse {
        let input = GetUserRequest(
            userId: userId
        )
        return try await self.getUser(input, logger: logger)
    }

    /// A temporary Amazon S3 location, where you can copy your files from a source location to stage or use as a scratch space in FinSpace notebook.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func getWorkingLocation(_ input: GetWorkingLocationRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> GetWorkingLocationResponse {
        try await self.client.execute(
            operation: "GetWorkingLocation", 
            path: "/workingLocationV1", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// A temporary Amazon S3 location, where you can copy your files from a source location to stage or use as a scratch space in FinSpace notebook.
    ///
    /// Parameters:
    ///   - locationType: Specify the type of the working location.    SAGEMAKER – Use the Amazon S3 location as a temporary location to store data content when working with FinSpace Notebooks that run on SageMaker studio.    INGESTION – Use the Amazon S3 location as a staging location to copy your data content and then use the location with the Changeset creation operation.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func getWorkingLocation(
        locationType: LocationType? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetWorkingLocationResponse {
        let input = GetWorkingLocationRequest(
            locationType: locationType
        )
        return try await self.getWorkingLocation(input, logger: logger)
    }

    /// Lists the FinSpace Changesets for a Dataset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func listChangesets(_ input: ListChangesetsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListChangesetsResponse {
        try await self.client.execute(
            operation: "ListChangesets", 
            path: "/datasets/{datasetId}/changesetsv2", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the FinSpace Changesets for a Dataset.
    ///
    /// Parameters:
    ///   - datasetId: The unique identifier for the FinSpace Dataset to which the Changeset belongs.
    ///   - maxResults: The maximum number of results per page.
    ///   - nextToken: A token that indicates where a results page should begin.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listChangesets(
        datasetId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListChangesetsResponse {
        let input = ListChangesetsRequest(
            datasetId: datasetId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listChangesets(input, logger: logger)
    }

    /// Lists all available Dataviews for a Dataset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func listDataViews(_ input: ListDataViewsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDataViewsResponse {
        try await self.client.execute(
            operation: "ListDataViews", 
            path: "/datasets/{datasetId}/dataviewsv2", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all available Dataviews for a Dataset.
    ///
    /// Parameters:
    ///   - datasetId: The unique identifier of the Dataset for which to retrieve Dataviews.
    ///   - maxResults: The maximum number of results per page.
    ///   - nextToken: A token that indicates where a results page should begin.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listDataViews(
        datasetId: String,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDataViewsResponse {
        let input = ListDataViewsRequest(
            datasetId: datasetId, 
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listDataViews(input, logger: logger)
    }

    /// Lists all of the active Datasets that a user has access to.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func listDatasets(_ input: ListDatasetsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListDatasetsResponse {
        try await self.client.execute(
            operation: "ListDatasets", 
            path: "/datasetsv2", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all of the active Datasets that a user has access to.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results per page.
    ///   - nextToken: A token that indicates where a results page should begin.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listDatasets(
        maxResults: Int? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListDatasetsResponse {
        let input = ListDatasetsRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listDatasets(input, logger: logger)
    }

    /// Lists all available permission groups in FinSpace.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func listPermissionGroups(_ input: ListPermissionGroupsRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListPermissionGroupsResponse {
        try await self.client.execute(
            operation: "ListPermissionGroups", 
            path: "/permission-group", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all available permission groups in FinSpace.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results per page.
    ///   - nextToken: A token that indicates where a results page should begin.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listPermissionGroups(
        maxResults: Int,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListPermissionGroupsResponse {
        let input = ListPermissionGroupsRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listPermissionGroups(input, logger: logger)
    }

    /// Lists all the permission groups that are associated with a specific user.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func listPermissionGroupsByUser(_ input: ListPermissionGroupsByUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListPermissionGroupsByUserResponse {
        try await self.client.execute(
            operation: "ListPermissionGroupsByUser", 
            path: "/user/{userId}/permission-groups", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all the permission groups that are associated with a specific user.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results per page.
    ///   - nextToken: A token that indicates where a results page should begin.
    ///   - userId: The unique identifier for the user.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listPermissionGroupsByUser(
        maxResults: Int,
        nextToken: String? = nil,
        userId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListPermissionGroupsByUserResponse {
        let input = ListPermissionGroupsByUserRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            userId: userId
        )
        return try await self.listPermissionGroupsByUser(input, logger: logger)
    }

    /// Lists all available users in FinSpace.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func listUsers(_ input: ListUsersRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListUsersResponse {
        try await self.client.execute(
            operation: "ListUsers", 
            path: "/user", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all available users in FinSpace.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results per page.
    ///   - nextToken: A token that indicates where a results page should begin.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listUsers(
        maxResults: Int,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListUsersResponse {
        let input = ListUsersRequest(
            maxResults: maxResults, 
            nextToken: nextToken
        )
        return try await self.listUsers(input, logger: logger)
    }

    /// Lists details of all the users in a specific permission group.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func listUsersByPermissionGroup(_ input: ListUsersByPermissionGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ListUsersByPermissionGroupResponse {
        try await self.client.execute(
            operation: "ListUsersByPermissionGroup", 
            path: "/permission-group/{permissionGroupId}/users", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists details of all the users in a specific permission group.
    ///
    /// Parameters:
    ///   - maxResults: The maximum number of results per page.
    ///   - nextToken: A token that indicates where a results page should begin.
    ///   - permissionGroupId: The unique identifier for the permission group.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listUsersByPermissionGroup(
        maxResults: Int,
        nextToken: String? = nil,
        permissionGroupId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListUsersByPermissionGroupResponse {
        let input = ListUsersByPermissionGroupRequest(
            maxResults: maxResults, 
            nextToken: nextToken, 
            permissionGroupId: permissionGroupId
        )
        return try await self.listUsersByPermissionGroup(input, logger: logger)
    }

    /// Resets the password for a specified user ID and generates a temporary one. Only a superuser can reset password for other users. Resetting the password immediately invalidates the previous password associated with the user.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func resetUserPassword(_ input: ResetUserPasswordRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> ResetUserPasswordResponse {
        try await self.client.execute(
            operation: "ResetUserPassword", 
            path: "/user/{userId}/password", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Resets the password for a specified user ID and generates a temporary one. Only a superuser can reset password for other users. Resetting the password immediately invalidates the previous password associated with the user.
    ///
    /// Parameters:
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - userId: The unique identifier of the user that a temporary password is requested for.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func resetUserPassword(
        clientToken: String? = ResetUserPasswordRequest.idempotencyToken(),
        userId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ResetUserPasswordResponse {
        let input = ResetUserPasswordRequest(
            clientToken: clientToken, 
            userId: userId
        )
        return try await self.resetUserPassword(input, logger: logger)
    }

    /// Updates a FinSpace Changeset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func updateChangeset(_ input: UpdateChangesetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateChangesetResponse {
        try await self.client.execute(
            operation: "UpdateChangeset", 
            path: "/datasets/{datasetId}/changesetsv2/{changesetId}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a FinSpace Changeset.
    ///
    /// Parameters:
    ///   - changesetId: The unique identifier for the Changeset to update.
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - datasetId: The unique identifier for the FinSpace Dataset in which the Changeset is created.
    ///   - formatParams: Options that define the structure of the source file(s) including the format type (formatType), header row (withHeader), data separation character (separator) and the type of compression (compression).   formatType is a required attribute and can have the following values:     PARQUET – Parquet source file format.    CSV – CSV source file format.    JSON – JSON source file format.    XML – XML source file format.   Here is an example of how you could specify the formatParams:   "formatParams":  { "formatType": "CSV", "withHeader": "true", "separator": ",", "compression":"None" }    Note that if you only provide formatType as CSV, the rest of the attributes will automatically default to CSV values as following:   { "withHeader": "true", "separator": "," }   For more information about supported file formats, see Supported Data Types and File Formats in the FinSpace User Guide.
    ///   - sourceParams: Options that define the location of the data being ingested (s3SourcePath) and the source of the changeset (sourceType). Both s3SourcePath and sourceType are required attributes. Here is an example of how you could specify the sourceParams:   "sourceParams":  { "s3SourcePath": "s3://finspace-landing-us-east-2-bk7gcfvitndqa6ebnvys4d/scratch/wr5hh8pwkpqqkxa4sxrmcw/ingestion/equity.csv", "sourceType": "S3" }   The S3 path that you specify must allow the FinSpace role access. To do that, you first need to configure the IAM policy on S3 bucket. For more information, see Loading data from an Amazon S3 Bucket using the FinSpace APIsection.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func updateChangeset(
        changesetId: String,
        clientToken: String? = UpdateChangesetRequest.idempotencyToken(),
        datasetId: String,
        formatParams: [String: String],
        sourceParams: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateChangesetResponse {
        let input = UpdateChangesetRequest(
            changesetId: changesetId, 
            clientToken: clientToken, 
            datasetId: datasetId, 
            formatParams: formatParams, 
            sourceParams: sourceParams
        )
        return try await self.updateChangeset(input, logger: logger)
    }

    /// Updates a FinSpace Dataset.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func updateDataset(_ input: UpdateDatasetRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateDatasetResponse {
        try await self.client.execute(
            operation: "UpdateDataset", 
            path: "/datasetsv2/{datasetId}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a FinSpace Dataset.
    ///
    /// Parameters:
    ///   - alias: The unique resource identifier for a Dataset.
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - datasetDescription: A description for the Dataset.
    ///   - datasetId: The unique identifier for the Dataset to update.
    ///   - datasetTitle: A display title for the Dataset.
    ///   - kind: The format in which the Dataset data is structured.    TABULAR – Data is structured in a tabular format.    NON_TABULAR – Data is structured in a non-tabular format.
    ///   - schemaDefinition: Definition for a schema on a tabular Dataset.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func updateDataset(
        alias: String? = nil,
        clientToken: String? = UpdateDatasetRequest.idempotencyToken(),
        datasetDescription: String? = nil,
        datasetId: String,
        datasetTitle: String,
        kind: DatasetKind,
        schemaDefinition: SchemaUnion? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateDatasetResponse {
        let input = UpdateDatasetRequest(
            alias: alias, 
            clientToken: clientToken, 
            datasetDescription: datasetDescription, 
            datasetId: datasetId, 
            datasetTitle: datasetTitle, 
            kind: kind, 
            schemaDefinition: schemaDefinition
        )
        return try await self.updateDataset(input, logger: logger)
    }

    /// Modifies the details of a permission group. You cannot modify a permissionGroupID.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func updatePermissionGroup(_ input: UpdatePermissionGroupRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdatePermissionGroupResponse {
        try await self.client.execute(
            operation: "UpdatePermissionGroup", 
            path: "/permission-group/{permissionGroupId}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Modifies the details of a permission group. You cannot modify a permissionGroupID.
    ///
    /// Parameters:
    ///   - applicationPermissions: The permissions that are granted to a specific group for accessing the FinSpace application.  When assigning application permissions, be aware that the permission ManageUsersAndGroups allows users to grant themselves or others access to any functionality in their FinSpace environment's application. It should only be granted to trusted users.     CreateDataset – Group members can create new datasets.    ManageClusters – Group members can manage Apache Spark clusters from FinSpace notebooks.    ManageUsersAndGroups – Group members can manage users and permission groups. This is a privileged permission that allows users to grant themselves or others access to any functionality in the application. It should only be granted to trusted users.    ManageAttributeSets – Group members can manage attribute sets.    ViewAuditData – Group members can view audit data.    AccessNotebooks – Group members will have access to FinSpace notebooks.    GetTemporaryCredentials – Group members can get temporary API credentials.
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - description: A brief description for the permission group.
    ///   - name: The name of the permission group.
    ///   - permissionGroupId: The unique identifier for the permission group to update.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func updatePermissionGroup(
        applicationPermissions: [ApplicationPermission]? = nil,
        clientToken: String? = UpdatePermissionGroupRequest.idempotencyToken(),
        description: String? = nil,
        name: String? = nil,
        permissionGroupId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdatePermissionGroupResponse {
        let input = UpdatePermissionGroupRequest(
            applicationPermissions: applicationPermissions, 
            clientToken: clientToken, 
            description: description, 
            name: name, 
            permissionGroupId: permissionGroupId
        )
        return try await self.updatePermissionGroup(input, logger: logger)
    }

    /// Modifies the details of the specified user. You cannot update the userId for a user.
    @available(*, deprecated, message: "This method will be discontinued.")
    @Sendable
    @inlinable
    public func updateUser(_ input: UpdateUserRequest, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateUserResponse {
        try await self.client.execute(
            operation: "UpdateUser", 
            path: "/user/{userId}", 
            httpMethod: .PUT, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Modifies the details of the specified user. You cannot update the userId for a user.
    ///
    /// Parameters:
    ///   - apiAccess: The option to indicate whether the user can use the GetProgrammaticAccessCredentials API to obtain credentials that can then be used to access other FinSpace Data API operations.    ENABLED – The user has permissions to use the APIs.    DISABLED – The user does not have permissions to use any APIs.
    ///   - apiAccessPrincipalArn: The ARN identifier of an AWS user or role that is allowed to call the GetProgrammaticAccessCredentials API to obtain a credentials token for a specific FinSpace user. This must be an IAM role within your FinSpace account.
    ///   - clientToken: A token that ensures idempotency. This token expires in 10 minutes.
    ///   - firstName: The first name of the user.
    ///   - lastName: The last name of the user.
    ///   - type: The option to indicate the type of user.    SUPER_USER– A user with permission to all the functionality and data in FinSpace.    APP_USER – A user with specific permissions in FinSpace. The users are assigned permissions by adding them to a permission group.
    ///   - userId: The unique identifier for the user that you want to update.
    ///   - logger: Logger use during operation
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func updateUser(
        apiAccess: ApiAccess? = nil,
        apiAccessPrincipalArn: String? = nil,
        clientToken: String? = UpdateUserRequest.idempotencyToken(),
        firstName: String? = nil,
        lastName: String? = nil,
        type: UserType? = nil,
        userId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateUserResponse {
        let input = UpdateUserRequest(
            apiAccess: apiAccess, 
            apiAccessPrincipalArn: apiAccessPrincipalArn, 
            clientToken: clientToken, 
            firstName: firstName, 
            lastName: lastName, 
            type: type, 
            userId: userId
        )
        return try await self.updateUser(input, logger: logger)
    }
}

extension FinspaceData {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: FinspaceData, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension FinspaceData {
    /// Return PaginatorSequence for operation ``listChangesets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listChangesetsPaginator(
        _ input: ListChangesetsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListChangesetsRequest, ListChangesetsResponse> {
        return .init(
            input: input,
            command: self.listChangesets,
            inputKey: \ListChangesetsRequest.nextToken,
            outputKey: \ListChangesetsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listChangesets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - datasetId: The unique identifier for the FinSpace Dataset to which the Changeset belongs.
    ///   - maxResults: The maximum number of results per page.
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listChangesetsPaginator(
        datasetId: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListChangesetsRequest, ListChangesetsResponse> {
        let input = ListChangesetsRequest(
            datasetId: datasetId, 
            maxResults: maxResults
        )
        return self.listChangesetsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listDataViews(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listDataViewsPaginator(
        _ input: ListDataViewsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDataViewsRequest, ListDataViewsResponse> {
        return .init(
            input: input,
            command: self.listDataViews,
            inputKey: \ListDataViewsRequest.nextToken,
            outputKey: \ListDataViewsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDataViews(_:logger:)``.
    ///
    /// - Parameters:
    ///   - datasetId: The unique identifier of the Dataset for which to retrieve Dataviews.
    ///   - maxResults: The maximum number of results per page.
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listDataViewsPaginator(
        datasetId: String,
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDataViewsRequest, ListDataViewsResponse> {
        let input = ListDataViewsRequest(
            datasetId: datasetId, 
            maxResults: maxResults
        )
        return self.listDataViewsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listDatasets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listDatasetsPaginator(
        _ input: ListDatasetsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDatasetsRequest, ListDatasetsResponse> {
        return .init(
            input: input,
            command: self.listDatasets,
            inputKey: \ListDatasetsRequest.nextToken,
            outputKey: \ListDatasetsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDatasets(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results per page.
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listDatasetsPaginator(
        maxResults: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDatasetsRequest, ListDatasetsResponse> {
        let input = ListDatasetsRequest(
            maxResults: maxResults
        )
        return self.listDatasetsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listPermissionGroups(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listPermissionGroupsPaginator(
        _ input: ListPermissionGroupsRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListPermissionGroupsRequest, ListPermissionGroupsResponse> {
        return .init(
            input: input,
            command: self.listPermissionGroups,
            inputKey: \ListPermissionGroupsRequest.nextToken,
            outputKey: \ListPermissionGroupsResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listPermissionGroups(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results per page.
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listPermissionGroupsPaginator(
        maxResults: Int,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListPermissionGroupsRequest, ListPermissionGroupsResponse> {
        let input = ListPermissionGroupsRequest(
            maxResults: maxResults
        )
        return self.listPermissionGroupsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listUsers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listUsersPaginator(
        _ input: ListUsersRequest,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListUsersRequest, ListUsersResponse> {
        return .init(
            input: input,
            command: self.listUsers,
            inputKey: \ListUsersRequest.nextToken,
            outputKey: \ListUsersResponse.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listUsers(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The maximum number of results per page.
    ///   - logger: Logger used for logging
    @available(*, deprecated, message: "This method will be discontinued.")
    @inlinable
    public func listUsersPaginator(
        maxResults: Int,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListUsersRequest, ListUsersResponse> {
        let input = ListUsersRequest(
            maxResults: maxResults
        )
        return self.listUsersPaginator(input, logger: logger)
    }
}

extension FinspaceData.ListChangesetsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> FinspaceData.ListChangesetsRequest {
        return .init(
            datasetId: self.datasetId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension FinspaceData.ListDataViewsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> FinspaceData.ListDataViewsRequest {
        return .init(
            datasetId: self.datasetId,
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension FinspaceData.ListDatasetsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> FinspaceData.ListDatasetsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension FinspaceData.ListPermissionGroupsRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> FinspaceData.ListPermissionGroupsRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}

extension FinspaceData.ListUsersRequest: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> FinspaceData.ListUsersRequest {
        return .init(
            maxResults: self.maxResults,
            nextToken: token
        )
    }
}
